package cn.snmp.mutual.uk.event;

import java.util.*;

public class RawPduEvent extends EventObject {
    private static final String version_id = "@(#)$Id: RawPduEvent.java,v 1.5 2006/02/09 14:30:18 birgit Exp $ Copyright Westhawk Ltd";
    protected boolean consumed;
    private int version;
    private String hostAddress;
    private int hostPort;
    private byte[] message;

    public RawPduEvent(final Object source, final int v, final String hn, final byte[] mess, final int prt) {
        super(source);
        this.consumed = false;
        this.hostPort = -1;
        this.version = v;
        this.hostAddress = hn;
        this.message = mess;
        this.hostPort = prt;
    }

    public int getVersion() {
        return this.version;
    }

    public String getHostAddress() {
        return this.hostAddress;
    }

    public byte[] getMessage() {
        return this.message;
    }

    public int getHostPort() {
        return this.hostPort;
    }

    public void consume() {
        this.consumed = true;
    }

    public boolean isConsumed() {
        return this.consumed;
    }
}
